import React, { Component } from 'react'
import { View, StyleSheet, UIManager, Platform } from 'react-native'
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import HomeScreen from './Views/HomeScreen';
import Music from './Views/Music';

let Stack = createStackNavigator()

if (Platform.OS === 'android') {
    if (UIManager.setLayoutAnimationEnabledExperimental) {
        UIManager.setLayoutAnimationEnabledExperimental(true);
    }
}

export default class App extends Component {
    render() {
        return (
            <View style={styles.container}>
                <NavigationContainer ref={ref => this.navigation = ref}>
                    <Stack.Navigator headerMode='none'>
                        <Stack.Screen name="HomeScreen" component={HomeScreen} />
                        <Stack.Screen name="Music" component={Music} />
                    </Stack.Navigator>
                </NavigationContainer>
            </View>
        )
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
        backgroundColor: '#EEEEEE'
    }
})